<html lang="en" xml:lang="en"><head>
<META http-equiv="Content-Type" content="text/html">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><META name="description" content="SymbolChooser class"><meta name="content-language" content="en"><link href="rsrc/htmlhelp.css" rel="stylesheet" type="text/css"><title>Web AppBuilder for ArcGIS | Help - SymbolChooser
class</title>
                <script type="text/javascript" language="JavaScript">
                    var pathL  = self.location.pathname.split ("/");
                    var fname = pathL[pathL.length-1];
                    var i = fname.lastIndexOf (".htm");
                    if (i>=0) {
                    fname = fname.substring (0, i)
                    } else {
                    //??
                    }
                    if (self.location.hash) {
				    		      fname = fname + self.location.hash;
						        }
                    self.location.replace ("../index.html#//" + fname);
                </script>
                </head><!--Publication GUID: [GUID-E7D1C130-8F87-4109-8D61-E73A46083F52]--><!--Topic GUID: [GUID-C9580570-8AE1-4C10-924A-17980C859561]--><body><div id="content"><div class="header"><h1>SymbolChooser
class</h1><div id="breadcrumb"></div></div>
<p id="GUID-B7A362A6-6F8A-4163-BAEF-EFF68F7F4903">The SymbolChooser class makes it easy to configure the marker symbol, line symbol, fill symbol, and text symbol.</p><p id="GUID-6241EB0E-2E7C-4683-8604-B20CE3B60C2C"><b>AMD Module Require:</b></p>

<div class="codeblock" purpose="codeblock"><div class="highlight"><pre><code><span class="nx">require</span><span class="p">([</span><span class="s2">&quot;jimu/dijit/SymbolChooser&quot;</span><span class="p">],</span> <span class="kd">function</span><span class="p">(</span><span class="nx">SymbolChooser</span><span class="p">)</span> <span class="p">{</span> <span class="cm">/* code goes here */</span> <span class="p">});</span>
</code></pre></div>
</div><p id="GUID-234D5247-AEB8-470F-B55E-C442F676EDFC"><b>Constructor:</b></p><div class="block_table" id="TABLE_FB3E3B7A87094BBB9C30997D7B6225B4" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="1.12*"></colgroup><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-E6B42A3F-BC35-4C1D-8B7E-94B7146A53F6"><span class="usertext">new SymbolChooser(params, srcNodeRef)</span></p><p id="GUID-085A8B6D-23C4-4F8F-BA12-4B4B8214F753">Create a new SymbolChooser dijit.</p><p id="GUID-AC33215F-37CD-4B9E-A0AE-1BE632C706FA"><b>Parameters:</b></p><p id="GUID-CF12A78E-C52E-4C25-9B71-12BC8BF54A70"> &lt;Object&gt; params:  Required.  Parameters for the SymbolChooser dijit. </p><p id="GUID-B5E8D03A-75C9-499D-A2F7-F5E03B6B9101"> &lt;DOMNode | String&gt; srcNodeRef: Required.  HTML element where the SymbolChooser dijit is rendered.</p><p id="GUID-CD769324-9A7A-4C37-A98E-40D0092DC74B"><b> params properties:</b></p><p id="GUID-3A765AF7-8CC2-4DA4-8496-F8AFFF82376D"> &lt;String&gt; type:  Optional.  This property indicates which symbol the dijit shows. The available values are marker, line, fill, and text. <div class="notes" id="GUID-D07F3074-4941-4160-BB17-99CA938B4F91"><div class="note"><img class="note_img" src="rsrc/note.png" alt="Note" title="Note"><span>Note:</span></div><div class="tipbody"><p id="GUID-D112F206-BD21-4775-9728-A31EA1C52704">Either the type property or the symbol property is required.</p></div></div></p><p id="GUID-83FF759D-B9D5-4442-AC69-FE1AE99D803D"> &lt;Symbol&gt; symbol: Optional.  The symbol to show. <div class="notes" id="GUID-6C78D1EA-B903-452F-9A82-9777312F273B"><div class="note"><img class="note_img" src="rsrc/note.png" alt="Note" title="Note"><span>Note:</span></div><div class="tipbody"><p id="GUID-E70FDD83-9E77-4A2E-85B1-44934FC9AABF">The symbol property only supports the following types: SimpleMarkerSymbol,
PictureMarkerSymbol, SimpleLineSymbol, CartographicLineSymbol, SimpleFillSymbol, and TextSymbol. Either the type
property or the symbol property is required.</p></div></div></p>
<p id="GUID-ECC89539-599F-4D31-A0E9-DD83AE2C6D1E">Example:</p><div class="codeblock" purpose="codeblock"><div class="highlight"><pre><code><span class="nx">require</span><span class="p">([</span><span class="s1">&#39;jimu/dijit/SymbolChooser&#39;</span><span class="p">],</span> <span class="kd">function</span><span class="p">(</span><span class="nx">SymbolChooser</span><span class="p">){</span>
			    		<span class="kd">var</span> <span class="nx">symbolChooser</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">SymbolChooser</span><span class="p">({</span>
			    			<span class="nx">type</span><span class="o">:</span> <span class="s2">&quot;marker&quot;</span>
			    		<span class="p">},</span> <span class="nx">srcNodeRef</span><span class="p">);</span>
			    		<span class="p">...</span>
			    	<span class="p">});</span>

			    	<span class="nx">require</span><span class="p">([</span><span class="s1">&#39;jimu/dijit/SymbolChooser&#39;</span><span class="p">,</span><span class="s1">&#39;esri/symbols/SimpleMarkerSymbol&#39;</span><span class="p">],</span> <span class="kd">function</span><span class="p">(</span><span class="nx">SymbolChooser</span><span class="p">,</span> <span class="nx">SimpleMarkerSymbol</span><span class="p">){</span>
			    		<span class="kd">var</span> <span class="nx">symbol</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">SimpleMarkerSymbol</span><span class="p">();</span>
						<span class="kd">var</span> <span class="nx">symbolChooser</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">SymbolChooser</span><span class="p">({</span>
			    			<span class="nx">symbol</span><span class="o">:</span> <span class="nx">symbol</span>
			    		<span class="p">},</span> <span class="nx">srcNodeRef</span><span class="p">);</span>
			    		<span class="p">...</span>
			    	<span class="p">});</span>
</code></pre></div>
</div></td></tr></tbody></table><span class="table_desc"></span></div><p id="GUID-A486A03D-9829-4F5D-AD35-D65E7FE14691"><b>Methods:</b></p><div class="block_table" id="TABLE_24FF40BE05DE40F6A5C535C77134EE88" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="1.12*"></colgroup><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-B082C525-B6EB-4762-B7A5-37977F4AAF8D"><span class="usertext"> showByType(type)</span></p><p id="GUID-7C456A97-35CB-40DD-A338-18EE6B6A74AF"> Determines which  symbol shows.</p><p id="GUID-BF06D232-3485-4810-A3B0-FC9605B30E63"><b>Parameters:</b></p><p id="GUID-45C5C1D2-EA78-48D7-9F91-F09FC6230F57"> &lt;String&gt; type:   Required.   The available values are marker, line, fill, and text.</p>
</td></tr></tbody></table><span class="table_desc"></span></div><div class="block_table" id="TABLE_E6B1095AB6AF4CF5B467E9C33F883EAE" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="1.12*"></colgroup><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-0AAEB601-FFD5-42A9-ABD2-12DD55EA5594"><span class="usertext"> showBySymbol(symbol)</span></p><p id="GUID-268C6045-5F5B-47A3-B21F-4C853DBB68AB">  Shows the specified symbol.</p><p id="GUID-46EDEC20-C554-4B93-BD47-127ECF5A5DDA"><b>Parameters:</b></p><p id="GUID-638453DB-ECFD-421E-BADC-4B79B3C1F8DC">  &lt;Symbol&gt; symbol:   Required.   The symbol to show. It only supports the following types:
SimpleMarkerSymbol, PictureMarkerSymbol, SimpleLineSymbol, CartographicLineSymbol, SimpleFillSymbol, and TextSymbol.</p>



</td></tr></tbody></table><span class="table_desc"></span></div><div class="block_table" id="TABLE_2B841D99ED7A455BB0A10A9038E30FFB" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="1.12*"></colgroup><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-484F5A67-3DD6-418D-833F-21F370C85717"><span class="usertext"> getSymbol()</span></p><p id="GUID-8806C3DD-A17E-4A3E-BE83-F2B4075AA514">  Gets the symbol configured by SymbolChooser.</p>
<p id="GUID-00B43844-CCBE-4391-BCF5-0F24A6DD183C"> Return type: Symbol.</p></td></tr></tbody></table><span class="table_desc"></span></div><p id="GUID-46AFF33F-6970-4FE7-9629-8E3526F7FE0C"><b>Events:</b></p><div class="block_table" id="TABLE_F91FDB3036134BCA818FB77C49B76E5C" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="1.12*"></colgroup><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-485A9313-B46E-4CF6-8C0A-F34B1A5A6CD4"><span class="usertext"> change</span></p><p id="GUID-4FF5F8B7-C183-48E8-A030-ED8E2A2198BF">   Fires when the symbol changes.</p><p id="GUID-C052A12D-52CD-476D-9C3A-F0073105B219">Example:</p><div class="codeblock" purpose="codeblock"><div class="highlight"><pre><code><span class="nx">require</span><span class="p">([</span><span class="s1">&#39;dojo/on&#39;</span><span class="p">,</span><span class="s1">&#39;jimu/dijit/SymbolChooser&#39;</span><span class="p">],</span> <span class="kd">function</span><span class="p">(</span><span class="nx">on</span><span class="p">,</span> <span class="nx">SymbolChooser</span><span class="p">){</span>
		    			<span class="kd">var</span> <span class="nx">symbolChooser</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">SymbolChooser</span><span class="p">(...);</span>
		    			<span class="p">...</span>
		    			<span class="nx">on</span><span class="p">(</span><span class="nx">symbolChooser</span><span class="p">,</span><span class="s1">&#39;change&#39;</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">newSymbol</span><span class="p">){</span>
		    				<span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">newSymbol</span><span class="p">);</span>
		    			<span class="p">});</span>
		    		<span class="p">})</span>
</code></pre></div>
</div>



</td></tr></tbody></table><span class="table_desc"></span></div><div class="footer"> Copyright © 1995-2016 Esri. All rights reserved. </div></div></body></html>